def play_game(number_range, max_attempts):
    """开始游戏"""
    target = random.randint(number_range[0], number_range[1])
    attempts = 0

    print(f"\n游戏开始！目标数字在 {number_range[0]} 到 {number_range[1]} 之间，你有 {max_attempts} 次机会。")